﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
using System.ComponentModel;

namespace GameEditor.Common
{
    public class Vector2
    {
        private float x = 1.0f;
        //[GameEditor.Common.NumeralRange(0, 60)]
        [Editor(typeof(GameEditor.Common.NumeralSliderEditor), typeof(System.Drawing.Design.UITypeEditor))]
        public float X
        {
            get { return x; }
            set { x = value; }
        }

        private float y = 1.0f;
        //[GameEditor.Common.NumeralRange(0, 60)]
        [Editor(typeof(GameEditor.Common.NumeralSliderEditor), typeof(System.Drawing.Design.UITypeEditor))]
        public float Y
        {
            get { return y; }
            set { y = value; }
        }

        public Vector2()
        {
        }

        public Vector2(float x, float y)
        {
            this.x = x;
            this.y = y;
        }

        public override string ToString()
        {
            return String.Format("X={0},Y={1}", x, y);
        }
    }
}
